package com.yixun.qfbao.model.enums;

public enum UsableEnum {
    USABLE(1, "可用"),
    DISABLE(0, "不可用");

    public static String getDescByNo(Integer no) {
        for (UsableEnum usable : UsableEnum.values()) {
            if(usable.getNo().equals(no)) {
                return usable.getDesc();
            }
        }
        return null;
    }
    UsableEnum(Integer no, String desc) {
        this.no = no;
        this.desc = desc;
    }

    private Integer no;

    private String desc;

    public Integer getNo() {
        return no;
    }

    public void setNo(Integer no) {
        this.no = no;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
